Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't resolve code lenses if server doesn't support resolving #1888

Merged
merged 2 commits into from
Nov 6, 2021

Conversation

rchl
Copy link
Member

@rchl rchl commented Nov 2, 2021

Also show the error text when resolving code lens fails.

We could also make the code lens text red when resolving fails but not sure it's worth it for that corner case.

Fixes #1886

Also show the error text when resolving code lens fails.

Fixes #1886
@rwols rwols merged commit 451069b into main Nov 6, 2021
@rwols rwols deleted the fix/code-lens-resolve-error branch November 6, 2021 18:59
@rchl
Copy link
Member Author

rchl commented Nov 6, 2021

For the record I'll just add that the main fix that actually fixes the reported issue is this:

    def _on_code_lenses_resolved_async(self, mode: str) -> None:
        if self._is_listener_alive():
            sublime.set_timeout(lambda: self._code_lenses.render(mode))

So basically checking if the view listener is still alive after long-running request, and not handling the response if it isn't.

This is a pretty generic problem that we might want to find a generic solution for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error handling None in Console
2 participants